package it.magazzinoCofi.view;

import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;

public abstract class BaseFrame extends JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public BaseFrame getFrame() {
		return this;
	}

	public void addListener(ActionListener log, JButton button) {
		button.addActionListener(log);
	}

	public abstract void addSubmitListener(ActionListener listenForSubmit);

	public void displayErrorMessage(String errorMessage) {

		JOptionPane.showMessageDialog(this, errorMessage);

	}
}
